package dk.pun.dums.client.event;

import com.google.gwt.event.shared.GwtEvent;

import dk.pun.dums.shared.character.CharacterData;

public class CharacterDeletedEvent extends GwtEvent<SelectCharacterEventHandler> {

	public static final Type<SelectCharacterEventHandler> TYPE = new Type<SelectCharacterEventHandler>();

	private final transient CharacterData characterData;

	public CharacterDeletedEvent(final CharacterData characterData) {
		super();
		this.characterData = characterData;
	}

	public CharacterData getCharacterData() {
		return this.characterData;
	}

	@Override
	public Type<SelectCharacterEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(final SelectCharacterEventHandler handler) {
		handler.onCharacterDeleted(this);
	}

}
